home *** CD-ROM | disk | FTP | other *** search
/ Complete Linux / Complete Linux.iso / docs / apps / database / postgres / postgre3.z / postgre3 / src / lib / H / tcop / dest.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-08-27  |  2.4 KB  |  65 lines

  1. /* ----------------------------------------------------------------
  2.  *   FILE
  3.  *    dest.h
  4.  *    
  5.  *   DESCRIPTION
  6.  *    Whenever the backend is submitted a query, the results
  7.  *    have to go someplace - either to the standard output,
  8.  *    to a local portal buffer or to a remote portal buffer.
  9.  *
  10.  *    -    stdout is the destination only when we are running a
  11.  *    backend without a postmaster and are returning results
  12.  *    back to the user.
  13.  *
  14.  *    -    a local portal buffer is the destination when a backend
  15.  *    executes a user-defined function which calls PQexec() or
  16.  *    PQfn().  In this case, the results are collected into a
  17.  *    PortalBuffer which the user's function may diddle with.
  18.  *
  19.  *    -    a remote portal buffer is the destination when we are
  20.  *    running a backend with a frontend and the frontend executes
  21.  *    PQexec() or PQfn().  In this case, the results are sent
  22.  *    to the frontend via the pq_ functions.
  23.  *
  24.  *    - None is the destination when the system executes
  25.  *    a query internally.  This is not used now but it may be
  26.  *    useful for the parallel optimiser/executor.
  27.  *    
  28.  *   NOTES
  29.  *
  30.  *   IDENTIFICATION
  31.  *    $Header: /private/postgres/src/lib/H/tcop/RCS/dest.h,v 1.6 1992/05/06 06:01:10 mer Exp $
  32.  * ----------------------------------------------------------------
  33.  */
  34.  
  35. #ifndef DestIncluded
  36. #define DestIncluded
  37.  
  38. /* ----------------
  39.  *    CommandDest is used to allow the results of calling
  40.  *    pg_eval() to go to the right place.
  41.  * ----------------
  42.  */
  43. typedef enum {
  44.     None,        /* results are discarded */
  45.     Debug,        /* results go to debugging output */
  46.     Local,        /* results go in local portal buffer */
  47.     Remote,        /* results sent to frontend process */
  48.     CopyBegin,    /* results sent to frontend process but are strings */
  49.         CopyEnd            /* results sent to frontend process but are strings */
  50.    ,RemoteInternal      /* results sent to frontend process in internal
  51.                (binary) form */
  52. } CommandDest;
  53.  
  54. /* dest.c */
  55. void donothing ARGS((List tuple , List attrdesc ));
  56. void EndCommand ARGS((String commandTag , CommandDest dest ));
  57. void SendCopyBegin ARGS((void ));
  58. void ReceiveCopyBegin ARGS((void ));
  59. void NullCommand ARGS((CommandDest dest ));
  60. void BeginCommand ARGS((char *pname , int operation , LispValue attinfo , bool isIntoRel , bool isIntoPortal , char *tag , CommandDest dest ));
  61. void ResetAppendOid();
  62. void UpdateAppendOid ARGS(( ObjectId newoid ));
  63. ObjectId GetAppendOid();
  64. #endif  DestIncluded
  65.